home *** CD-ROM | disk | FTP | other *** search
/ Mission to McDonaldLand / Mission To McDonaldLand.iso / code.cst / 00003_Script_OPEN < prev    next >
Text File  |  1998-10-29  |  5KB  |  143 lines

  1. on enterFrame
  2.   global heading
  3.   global move
  4.   global updown
  5.   global silly
  6.   global silly2
  7.   global nomore
  8.   global CStop
  9.   global castrestore
  10.   global restoration
  11.   
  12.   if CStop = 1 then 
  13.     if the mouseH < the locH of sprite 30 then set the member of sprite 30 = "Left"
  14.     if the mouseH > the locH of sprite 30 then set the member of sprite 30 = "Right"
  15.     abort
  16.   end if
  17.   
  18.   if silly > 0 then abort
  19.   if silly2 > 0 then abort
  20.   
  21.   if the mouseV < 270 or the mouseH > the locH of sprite 30 - 20 and the mouseH < the locH of sprite 30 + 20 then
  22.     if heading = 1 then set the member of sprite 30 = "Left"
  23.     if heading = 2 then set the member of sprite 30 = "Right"
  24.     set move = 0
  25.   end if
  26.   
  27.   if the mouseH > the locH of sprite 30 + 19 and the mouseV > 270 then 
  28.     set the member of sprite 30 = "Walk Right"
  29.     set heading = 2
  30.     set move = 1
  31.     set the locH of sprite 30 = the locH of sprite 30 + 15
  32.   end if
  33.   
  34.   if the mouseH < the locH of sprite 30 - 19 and the mouseV > 270 then 
  35.     set the member of sprite 30 = "Walk Left"
  36.     set heading = 1
  37.     set move = 1
  38.     set the locH of sprite 30 = the locH of sprite 30 - 15
  39.   end if
  40.   
  41.   if the mouseV > the locV of sprite 30 and the mouseV < the locV of sprite 30 + 50 then 
  42.     if move = 0 and heading = 1 then set the member of sprite 30 = "Left"
  43.     if move = 0 and heading = 2 then set the member of sprite 30 = "Right"
  44.     set updown = 0
  45.   end if
  46.   
  47.   if the mouseV < the locV of sprite 30 then 
  48.     if the locV of sprite 30 > 300 then
  49.       if move = 0 and heading = 1 then set the member of sprite 30 = "Walk Left"
  50.       if move = 0 and heading = 2 then set the member of sprite 30 = "Walk Right"
  51.       set the locV of sprite 30 = the locV of sprite 30 - 5
  52.       set updown = 1
  53.     end if
  54.   end if
  55.   
  56.   if the mouseV > the locV of sprite 30 + 50 then 
  57.     if the locV of sprite 30 < 350 then
  58.       if move = 0 and heading = 1 then set the member of sprite 30 = "Walk Left"
  59.       if move = 0 and heading = 2 then set the member of sprite 30 = "Walk Right"
  60.       set the locV of sprite 30 = the locV of sprite 30 + 5
  61.       set updown = 1
  62.     end if
  63.   end if
  64.   
  65.   if the locH of sprite 30 > 600 then 
  66.     set the locH of sprite 30 = 50
  67.     set the member of sprite 30 = "blank"
  68.     set nomore = 0
  69.     set restoration = 0
  70.     set castrestore = 0
  71.     puppetTransition 11, 1, 30, TRUE
  72.     go next
  73.     set the member of sprite 30 = "Walk Right"
  74.   end if
  75.   
  76.   if the locH of sprite 30 < 40 then 
  77.     set the locH of sprite 30 = 590
  78.     set the member of sprite 30 = "blank"
  79.     set nomore = 0
  80.     set restoration = 0
  81.     set castrestore = 0
  82.     puppetTransition 12, 1, 30, TRUE
  83.     go previous
  84.     set the member of sprite 30 = "Walk Left"
  85.   end if
  86.   
  87. end
  88.  
  89.  
  90. on rightMouseDown
  91.   global silly
  92.   global silly2
  93.   global heading
  94.   global CStop
  95.   if CStop = 1 then abort
  96.   if the mouseH > the locH of sprite 30 - 60 and the mouseH < the locH of sprite 30 + 60 and silly < 1 then 
  97.     if heading = 1 then 
  98.       set the locH of sprite 30 = the locH of sprite 30 + 16
  99.       set the locV of sprite 30 = the locV of sprite 30 - 14
  100.       set the member of sprite 30 = "backflipL"
  101.     end if
  102.     if heading = 2 then 
  103.       set the locH of sprite 30 = the locH of sprite 30 - 16
  104.       set the locV of sprite 30 = the locV of sprite 30 - 14
  105.       set the member of sprite 30 = "backflipR"
  106.     end if
  107.     set silly = 1
  108.   end if
  109.   
  110.   if silly2 < 1 and (the mouseH < the locH of sprite 30 - 60 or the mouseH > the locH of sprite 30 + 60) then
  111.     set silly2 = 1
  112.     set the locV of sprite 30 = the locV of sprite 30 - 15
  113.     if heading = 2 then set the member of sprite 30 = "cartwheelR"
  114.     if heading = 1 then set the member of sprite 30 = "cartwheelL"
  115.   end if
  116. end
  117.  
  118.  
  119. on exitFrame
  120.   global silly
  121.   global silly2
  122.   global heading
  123.   if silly > 0 then set silly = silly + 1
  124.   if silly > 12 then
  125.     set silly = 0
  126.     if heading = 1 then set the locH of sprite 30 = the locH of sprite 30 + 50
  127.     if heading = 2 then set the locH of sprite 30 = the locH of sprite 30 - 50
  128.     set the locV of sprite 30 = the locV of sprite 30 + 14
  129.   end if
  130.   if silly2 > 0 then
  131.     if heading = 2 then set the locH of sprite 30 = the locH of sprite 30 + 20
  132.     if heading = 1 then set the locH of sprite 30 = the locH of sprite 30 - 20
  133.     set silly2 = silly2 + 1
  134.   end if
  135.   
  136.   if silly2 > 10 then 
  137.     set silly2 = 0
  138.     set the locV of sprite 30 = the locV of sprite 30 + 15
  139.   end if
  140.   
  141.   go the frame
  142.   
  143. end